package star.cloud.asme.base.fowable.listener.taskListener;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;
import org.springframework.stereotype.Component;

import java.util.Arrays;

@Component("chairmanTaskListener")
@Slf4j
public class ChairmanTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        log.info("chairmanTaskListener is running");
        delegateTask.setVariable("users", Arrays.asList("yinhongqi", "jilonghua", "zhouyushan"));
        log.info("chairmanTaskListener is finished");
    }
}
